package com.liuqinqi.barter.exception;

import com.liuqinqi.barter.common.enums.ResponseCodeEnum;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class ServiceException extends RuntimeException{

	/**
	 * 
	 */
	private static final long serialVersionUID = 641997810324534069L;
	private Integer code;
	private String errorMsg;

	public ServiceException(String errorMsg) {
		this.code = ResponseCodeEnum.ERROR.getCode();
		this.errorMsg = errorMsg;
	}
}
